/*
 * tab_crash_curve.h
 *
 *  Created on: 16.06.2013
 *      Author: SpirTanol
 */

#ifndef TAB_CRASH_CURVE_H_
#define TAB_CRASH_CURVE_H_

#include "events/data_event_listener.h"

// Qt
#include <QWidget>

class QLabel;

class CrashPlot;
class MainWindow;

class TabCrashCurve : public QWidget, public DataEventListener
{
	QLabel *oLabelCrashText;
	QLabel *oLabelCrashTime;

	CrashPlot *oPlot;
	uint oPlotWriteTime;
	int oCrashCode;

	MainWindow *oMainWindow;

public:
	TabCrashCurve(MainWindow *mainWindow);
	~TabCrashCurve();

	// DataEventListener
	void onDataEvent(const DataEvent *e); // [virtual]

	inline const CrashPlot *crashPlot() const { return oPlot; }
	inline uint crashPlotWriteTime() const { return oPlotWriteTime; }
	inline int crashCode() const { return oCrashCode; }

};

#endif /* TAB_CRASH_CURVE_H_ */
